# -*- coding: utf-8 -*-
# @Time : 2023/12/18 17:26
# @Author : Z
# @Email : 1473858993@qq.com
# @File : conftest.py
# @Project : apitwo
import pytest

from utils.yaml_util import yaml_urils
# import mysql.connector

@pytest.fixture(scope='session', autouse=True)
def clean_yml():

    yield
    yaml_urils.clear_extract_yaml()

# @pytest.fixture(scope='session',autouse=True)
# def connect_mysql():
#     # 连接到MySQL数据库
#     cnx = mysql.connector.connect(user='root', password='zxg963.0',
#                                   host='43.139.169.177', database='roncoo_mini_pay_demo')
#     # 创建游标对象
#     cursor = cnx.cursor()
#     # 执行SQL查询
#     cursor.execute('SELECT * FROM your_table')
#     # 获取查询结果
#     rows = cursor.fetchall()
#     # 处理查询结果
#     for row in rows:
#         print(row)
#     yield
#     # 关闭游标和连接
#     cursor.close()
#     cnx.close()